﻿<UserControl x:Class="InseSoft.Views.Controls.EmpresaEdit"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"             
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:local="clr-namespace:InseSoft.Models.Entities" 
             mc:Ignorable="d" 
             d:DesignHeight="230" d:DesignWidth="420">
    <UserControl.Resources>
        <Style TargetType="Label">
            <Setter Property="VerticalAlignment" Value="Center" />
        </Style>

    </UserControl.Resources>
    <Grid d:DataContext="{d:DesignInstance {x:Type local:Empresa}}">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="100" />
            <ColumnDefinition Width="100" />
            <ColumnDefinition Width="10" />
            <ColumnDefinition Width="100" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="27" />
            <RowDefinition Height="27" />
            <RowDefinition Height="27" />
            <RowDefinition Height="27" />
            <RowDefinition Height="27" />
            <RowDefinition Height="27" />
            <RowDefinition Height="60" />
        </Grid.RowDefinitions>
        <Label Content="Código" Grid.Row="0"/>
        <Label Content="Nombre" Grid.Row="1" />
        <Label Content="Cédula jurídica" Grid.Row="2" />
        <Label Content="Teléfono" Grid.Row="3" />
        <Label Content="Fax" Grid.Row="3" Grid.Column="3" />
        <Label Content="Imp. de venta" Grid.Row="4" />
        <Label Content="Porc. de utilidad" Grid.Row="4" Grid.Column="3"/>
        <Label Content="Email" Grid.Row="5"/>
        <Label Content="Dirección" Grid.Row="6"/>

        <Label Grid.Row="0" Grid.Column="1" FontWeight="Bold" Content="{Binding Path=FriendlyId}" />
        <TextBox Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="4" Width="300" VerticalAlignment="Center" HorizontalAlignment="Left" MaxLength="50" Text="{Binding Path=Nombre, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}"/>
        <TextBox Grid.Row="2" Grid.Column="1" Width="100" MaxLength="20" Text="{Binding Path=Cedula, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
        <TextBox Grid.Row="3" Grid.Column="1" Width="100" MaxLength="20" Text="{Binding Path=Telefono, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
        <TextBox Grid.Row="3" Grid.Column="4" Width="90" MaxLength="20" Text="{Binding Path=Fax, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
        <TextBox Grid.Row="4" Grid.Column="1" Width="100" MaxLength="10" Text="{Binding Path=ImpuestoVenta, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, StringFormat=N2}"/>
        <TextBox Grid.Row="4" Grid.Column="4" Width="90" MaxLength="10" Text="{Binding Path=Utilidad, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, StringFormat=N2}"/>
        <TextBox Grid.Row="5" Grid.Column="1" Grid.ColumnSpan="4" Width="300" MaxLength="50" Text="{Binding Path=Email, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
        <TextBox Grid.Row="6" Grid.Column="1" Grid.ColumnSpan="4" Width="300" MaxLength="500" Height="54" TextWrapping="Wrap" VerticalScrollBarVisibility="Auto" AcceptsReturn="True" Text="{Binding Path=Direccion, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
    </Grid>
</UserControl>
